<?php
namespace  Novel\Controller;


use Api\Client\ApiClient;
use User\Forms\RecordForm;
use Zend\Mvc\Controller\AbstractActionController;
class IndexController extends AbstractActionController{


    public function indexAction(){

        $viewData=array();
        $id=1;
        $viewData["novels"]= ApiClient::getNovels();

        return $viewData;
    }

    public function chapterAction(){

        $viewData=array();
        $id = $this->params()->fromRoute('id');
        $viewData["novel"]= ApiClient::getNovel($id);
        return $viewData;

    }

}